gtksecurememory: Request that secure memory not be dumped to disk
authorMatthew Garrett <matthewgarrett@google.com>
Fri, 19 Apr 2019 20:08:32 +0000 (13:08 -0700)
committerJason Francis <jason@cycles.network>
Sat, 17 Apr 2021 23:29:42 +0000 (19:29 -0400)
commit6622ebb310c488a614627d56e931de802e2c3b55
tree7491e40537929fdd094da9fcf037d40e49509b63
parent3ad56a762f42306e24f02337a38eebdfed636bc9
gtksecurememory: Request that secure memory not be dumped to disk

Linux 3.4 added support for the MADV_DONTDUMP option to madvise(), which
requests that the covered memory not be included in coredumps. It makes
sense to use this to prevent cases where application crashes could
result in secrets being persisted to disk or included in dumps that are
uploaded to remote servers for analysis. I've avoided making this fatal
since there's a chance this code could be built on systems that have
MADV_DONTDUMP but run on systems that don't.
gtk/gtksecurememory.c